package com.aliyun.demo.wenxin.controller;

import com.aliyun.demo.wenxin.entity.TUser;
import com.aliyun.demo.wenxin.service.TUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (TUser)表控制层
 *
 * @author version
 * @since 2020-07-31 21:25:34
 */
@RestController
@Slf4j
public class TUserController {
    /**
     * 服务对象
     */
    @Resource
    private TUserService tUserService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping(value = "/selectOne/{id}")
    public TUser selectOne(@PathVariable Integer id) {
        log.info("id="+id);
        return this.tUserService.queryById(id);
    }

}